Optimal. Leaf size=14 \[ \frac {\text {Li}_2\left (1-\frac {a}{x}\right )}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {1607, 2378,
2370, 2352} \begin {gather*} \frac {\text {PolyLog}\left (2,1-\frac {a}{x}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 1607
Rule 2352
Rule 2370
Rule 2378
Rubi steps
\begin {align*} \int \frac {\log \left (\frac {a}{x}\right )}{a x-x^2} \, dx &=\int \frac {\log \left (\frac {a}{x}\right )}{(a-x) x} \, dx\\ &=-\text {Subst}\left (\int \frac {\log (a x)}{\left (a-\frac {1}{x}\right ) x} \, dx,x,\frac {1}{x}\right )\\ &=-\text {Subst}\left (\int \frac {\log (a x)}{-1+a x} \, dx,x,\frac {1}{x}\right )\\ &=\frac {\text {Li}_2\left (1-\frac {a}{x}\right )}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.00, size = 16, normalized size = 1.14 \begin {gather*} \frac {\text {Li}_2\left (-\frac {a-x}{x}\right )}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 11, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {\dilog \left (\frac {a}{x}\right )}{a}\) | \(11\) |
default | \(\frac {\dilog \left (\frac {a}{x}\right )}{a}\) | \(11\) |
risch | \(\frac {\dilog \left (\frac {a}{x}\right )}{a}\) | \(11\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 72 vs.
\(2 (13) = 26\).
time = 0.28, size = 72, normalized size = 5.14 \begin {gather*} -{\left (\frac {\log \left (-a + x\right )}{a} - \frac {\log \left (x\right )}{a}\right )} \log \left (\frac {a}{x}\right ) - \frac {2 \, \log \left (-a + x\right ) \log \left (x\right ) - \log \left (x\right )^{2}}{2 \, a} + \frac {\log \left (x\right ) \log \left (-\frac {x}{a} + 1\right ) + {\rm Li}_2\left (\frac {x}{a}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 13, normalized size = 0.93 \begin {gather*} \frac {{\rm Li}_2\left (-\frac {a}{x} + 1\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 5.57, size = 82, normalized size = 5.86 \begin {gather*} - \left (\begin {cases} - \frac {1}{x} & \text {for}\: a = 0 \\\frac {\log {\left (\frac {a}{x} - 1 \right )}}{a} & \text {otherwise} \end {cases}\right ) \log {\left (\frac {a}{x} \right )} - \begin {cases} \frac {1}{x} & \text {for}\: a = 0 \\\frac {\begin {cases} \operatorname {Li}_{2}\left (\frac {a}{x}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \wedge \left |{x}\right | < 1 \\i \pi \log {\left (x \right )} + \operatorname {Li}_{2}\left (\frac {a}{x}\right ) & \text {for}\: \left |{x}\right | < 1 \\- i \pi \log {\left (\frac {1}{x} \right )} + \operatorname {Li}_{2}\left (\frac {a}{x}\right ) & \text {for}\: \frac {1}{\left |{x}\right |} < 1 \\- i \pi {G_{2, 2}^{2, 0}\left (\begin {matrix} & 1, 1 \\0, 0 & \end {matrix} \middle | {x} \right )} + i \pi {G_{2, 2}^{0, 2}\left (\begin {matrix} 1, 1 & \\ & 0, 0 \end {matrix} \middle | {x} \right )} + \operatorname {Li}_{2}\left (\frac {a}{x}\right ) & \text {otherwise} \end {cases}}{a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.46, size = 10, normalized size = 0.71 \begin {gather*} \frac {{\mathrm {Li}}_{\mathrm {2}}\left (\frac {a}{x}\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________